﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Movie.Master" AutoEventWireup="true" CodeBehind="Genres.aspx.cs" Inherits="MovieWebApp.Pages.Genres" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
    <tr>
    <td></td>
        <td>
            <asp:Label ID = "genreTitle" runat = "server" style = "color:White; font-size:x-large;"
                Text = "<%$ Resources:WebResources, Genre %>" />
        </td>    
    </tr>
    <tr>   
        <td>
            <asp:ImageButton ID = "imgAction" ImageUrl = "~/Images/action.bmp" runat = "server" 
                AlternateText = "Action" onclick = "imgAction_Click1" />
        </td>
        <td>
            <asp:ImageButton ID = "imgComedy" ImageUrl = "~/Images/comedy.bmp" runat = "server"
                AlternateText = "Comedy" OnClick = "imgComedy_Click" />
        </td>
        <td>
            <asp:ImageButton ID = "imgDrama" ImageUrl = "~/Images/drama.bmp" runat = "server"
                AlternateText = "Drama" OnClick = "imgDrama_Click" />
        </td>    
        <td>
            <asp:ImageButton ID = "imgHorror" ImageUrl = "~/Images/horror.bmp" runat = "server"
                AlternateText = "Horror" OnClick = "imgHorror_Click" />
        </td>
        <td>
            <asp:ImageButton ID = "imgScience" ImageUrl = "~/Images/science.bmp" runat = "server"
                AlternateText = "Science Fiction" OnClick = "imgScience_Click" />
        </td>
        <td>
            <asp:ImageButton ID = "imgThriller" ImageUrl = "~/Images/thriller.bmp" runat = "server"
                AlternateText = "Thriller" OnClick = "imgThriller_Click" />
        </td>
    </tr>
    </table>
    <table>
    <tr>
    <td>
        <asp:DataList RepeatLayout = "Table" RepeatColumns = "2" CellPadding = "20"
        RepeatDirection = "Horizontal" ItemStyle-BorderStyle = "Double"
        runat = "server" ID = "pList" Visible = "false" 
            onselectedindexchanged="pList_SelectedIndexChanged">
            <ItemTemplate>
         <asp:Image ID = "mveImage" runat = "server"
         ImageUrl = '<%# Eval("movieImage", "~/Images/{0}") %>'/>

    <%# DataBinder.Eval(Container.DataItem, "movieTitle") %><br />
    <%# DataBinder.Eval(Container.DataItem, "movieDesc") %><br />
    <%# String.Format("{0:c}",Convert.ToDecimal
            (DataBinder.Eval(Container.DataItem, "listPrice")))%><br />
    <asp:LinkButton ID = "AddToCart" CommandName = '<%#Container.ItemIndex %>' 
        runat = "server" OnClick = "AddToCartLink">Add To Cart</asp:LinkButton>       
            </ItemTemplate>
        </asp:DataList>
    </td></tr>
</table>
</asp:Content>
